@prefix-cls: ~'inbiz-Tree';

.@{prefix-cls} {
  margin-top: 1px !important;




  // &-node-title {
  //   display    : inline-flex;
  //   align-items: center;

  //   &-icon {
  //     margin-right: 5px;

  //     img {
  //       vertical-align: text-top;
  //     }
  //   }

  //   &-space {
  //     width: 3 * var(--inbiz-font-size-base);
  //   }

  //   &-opts {
  //     display: none;

  //     &-hover {
  //       display    : flex;
  //       align-items: center;
  //     }

  //     &-item {
  //       margin-right: 10px;
  //       white-space : nowrap;
  //     }
  //   }

  // }
  transform: unset;

  &-tree {
    .react-contexify {
      width: 120px;
      min-width: 100px;
      padding: 8px;
      border: solid 1px #ddd;
      border-radius: 4px;
      box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12);

      .react-contexify__item__content {
        display: block;
        width: 100%;
        height: 32px;
        padding: 0 6px;
        overflow: hidden;
        color: #000;
        font-size: 14px;
        white-space: nowrap;
        text-overflow: ellipsis;
      }

      .react-contexify__item__content:hover,
      .react-contexify__item:not(.react-contexify__item--disabled):hover>.react-contexify__item__content,
      .react-contexify__item:not(.react-contexify__item--disabled):focus>.react-contexify__item__content {
        color: #000;
        background-color: #f5f5f5;
        border-radius: 4px;
      }
    }

    .ant-tree-title,
    .ant-tree-switcher span {
      padding-top: 0 !important;
      // vertical-align: middle !important;
    }

    .ant-tree-treenode-selected {
      background-color: var(--ant-primary-2) !important;

      // &:hover {
      //   background-color: inherit !important;
      // }
    }

    .ant-tree .ant-tree-node-content-wrapper:hover,
    .ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected {
      background-color: rgba(0, 0, 0, 0);
    }

    .ant-tree-switcher-noop::before {
      display: block;
      width: 8px;
      height: 8px;
      margin: 0 0 0 7px;
      border: 2px solid #aaa;
      border-radius: 50%;
      content: '';
    }

    // #f5f5f5
    .ant-tree-switcher {
      width: 20px;
    }

    .ant-tree-treenode {
      align-items: center !important;
      padding: 2px 0 !important;

      &:hover {
        background-color: #f5f5f5;
      }

      .ant-tree-switcher {
        display: flex;
        align-items: center;
      }

      .ant-tree-checkbox {
        margin: 0 5px 0 0;
      }

      .ant-tree-icon_loading {
        display: none !important;
      }

      .ant-tree-node-content-wrapper {
        display: flex;
        align-items: center;
        padding-left: 0 !important;

        .ant-tree-iconEle {
          display: flex;
          align-items: center;
          width: 20px !important;
          margin-right: 5px;
          padding-top: 1px;
          vertical-align: middle !important;

          img {
            display: block;
            width: 20px !important;
            height: 20px !important;
          }
        }
      }
    }


    // 搜索列表
    .searchInput {
      padding: 0 2px;

      input {
        // font-size  : 12px;
        line-height: 20px;
      }

      .ant-input-affix-wrapper {
        padding: 4px 5px 4px 11px;
      }
    }

    .searchList {
      padding-top: 10px;

      // padding:6px 8px;
      .ant-list-item {
        padding: 3px 8px;
        font-size: var(--inbiz-font-size-base);
      }

      .ant-checkbox-group,
      .ant-checkbox-wrapper,
      .ant-checkbox-wrapper span:nth-of-type(2) {
        width: 100%;
      }

      .ant-checkbox-wrapper+.ant-checkbox-wrapper {
        margin-left: 0;
      }

      .item,
      .currentItem {
        cursor: pointer;
      }

      .item:hover {
        background: #f5f5f5;
      }

      .currentItem {
        background: var(--ant-primary-2);
        border-radius: 2px;
      }
    }
  }

  &-tree .viewStyle {
    .ant-tree-treenode {
      &:hover {
        background-color: #fff;
      }
    }
  }
}